package cn.com.can;

import java.util.UUID;

public class UTest {

	public static void main(String[] args) {
		UUID uuid  =  UUID.randomUUID(); 
		String s = UUID.randomUUID().toString();//用来生成数据库的主键id非常不错。。
		
		System.out.println(uuid);
		System.out.println(s);
		
		//保留一位小数点
		Long a = 8l, b = 9l;
		Double c = new Double((float)a/b);
		System.out.println(c);
		System.out.println(String.format("%.1f", c));
	}

}
